]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Dispose cairo contexts in osdWindow and screenShield
authorMatt Watson <mattdangerw@gmail.com>
Thu, 23 Jan 2014 03:10:21 +0000 (19:10 -0800)
committerCosimo Cecchi <cosimo@endlessm.com>
Wed, 29 Jan 2014 00:46:10 +0000 (16:46 -0800)
Need to manually dispose of cairo contexts used in gjs with $dispose(),
or the context object will leak. These classes used cairo for drawing but
were missing the dispose call.

https://bugzilla.gnome.org/show_bug.cgi?id=722812

js/ui/osdWindow.js
js/ui/screenShield.js

index 773960c9eb9e0a3b63f1a6a64c4b0550802ae135..199899fe0ca1006f19fc3d4799386dbba30454da 100644 (file)
@@ -66,6 +66,7 @@ const LevelBar = new Lang.Class({
         cr.arc(radius, h - radius, radius, 0.5 * Math.PI, Math.PI);
         cr.arc(radius, radius, radius, Math.PI, 1.5 * Math.PI);
         cr.fill();
+        cr.$dispose();
     }
 });
 
index 93dc81269a72a6a0e05642108eef0d6a85769fce..c0e58b379e088b3fcb8a634fb42e789cc76f1e02 100644 (file)
@@ -413,6 +413,7 @@ const Arrow = new Lang.Class({
         cr.lineTo(w/2, thickness);
         cr.lineTo(w - thickness / 2, h - thickness / 2);
         cr.stroke();
+        cr.$dispose();
     },
 
     vfunc_style_changed: function() {